<?
 include 'config.inc.php';
  $username = @$_GET['username'];
  $password = @$_GET['password'];
  include 'member.php';
?>
<!DOCTYPE html>
<html>    
<meta http-equiv="content-type" content="text/html;charset=utf-8">
 <head>
 <script src="js/jquery.1.7.2.min.js"></script>
 <link href="layui/css/layui.css" rel="stylesheet" type="text/css"/>
 <script src="layer/layer.js"></script>
 <script src="layui/layui.js"> </script>
 <body>
 <a>我的账号：<?echo $user['username']; ?></a><br>
 <a >我的昵称：<textarea id="name_value" type="textarea" autosize="[object Object]" rows="2" autocomplete="off" validateevent="true" style="height:20px;"><?echo $user['nickname']; ?></textarea></a><button id="set_nickname" class="layui-btn layui-btn-small">修改昵称</button><br>
 <a >我的等级：</a><span class="layui-badge layui-bg-green"><?echo $user['vip']; ?></span><br>
 <a >我的头像：</a><img width="50" height="50" src="<?echo $user['img']; ?>" ><button id="set_img" class="layui-btn layui-btn-small">修改头像</button>
 </body>
 <script>

 var username = '<? echo $username;?>';
 var password = '<? echo $password;?>';
 var set_nickname = 'nickname';


 var oBtn = document.getElementById('set_nickname');
    oBtn.onclick = function(){
   var name_value = document.getElementById('name_value').value;
   $.post("info_set.php", { username: username,password: password,set_nickname: set_nickname,name_value: name_value},
   function(data){
	//返回值
   layer.msg(data);
   });
};
 var oBtn = document.getElementById('set_img');
    oBtn.onclick = function(){
    window.location.href="member_img_file.php?username=<?echo $username;?>&password=<?echo $password;?>";
};

 </script>
